package com.ruicar.afs.cloud.channel.mange.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author xudongdong
 * @date 2020-06-03
 */
@Data
@Accessors(chain = true)
@TableName("channel_user")
public class ChannelUser extends Model<ChannelUser> {
    /**
     * The User real Id.
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
    /**
     * The User real name.
     */
    private String userRealName;

    // 用户登录名
    private String username;

    @ApiModelProperty(value = "用户所属区域")
    private String appertainRegions;

    @ApiModelProperty(value = "用户授权区域")
    private String authorizeRegions;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户所属区域")
    private List<ChannelAppertainRegion> appertainRegion;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户授权区域")
    private List<ChannelAppertainRegion> authorizeRegion;
}
